package com.java.demo;

import com.java.demo.model.Article;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-07-21
 * Time: 15:09
 */
@Order(1)
@Controller()
public class User {
        public void sayHi(){
            System.out.println("hi User");
        }
    @Bean(value="aaa")
    public Article article3(){
        //伪代码
        Article article=new Article();
        article.setId(4);
        article.setTitle("钢铁是怎样炼成的");
        article.setContent("一个人的一生不应该这样度过,不应该因碌碌无为而......");
        return article;
    }
}
